<?php

defined( 'IN_CLASS' ) or die( 'Access Error!' );

class indexcontrol extends control {
	
	public function __construct() {
		$aC = $this->_chechlogin(); //检查用户登陆
		all::$aU = model::member()->get( $aC['id'] );
	}
	
	public function onindex() {
		all::$aOut['sms_num'] = model::sms()->checknew( all::$aU['id'] );
		all::$aOut['mod_name'] = all::$cfg['navname']['index']; //模块名称
		all::$aOut['member_num'] = model::member()->gettotal();//班级成员数
		all::$aOut['top10'] = model::member()->gettop10();//输出班级会员积分 TOP 10
		all::$aOut['admin'] = model::member()->getadminlist();// 管理员列表
		all::$aOut['waitlist'] = model::member()->getwaitlist();// 等待验证的用户列表
		all::$aOut['randone'] = model::member()->getrandone();// 随机输出一条用户信息
		all::$aOut['msgs'] = model::word()->getnew();// The word that made by Member of the Class.
		all::$aOut['pic'] = model::pic()->getNewPic();// Member's Picture Infomation
		all::$aOut['pr'] = model::comment()->getNew();// Member's Picture's Reply Infomation
		all::$aOut['share'] = model::share()->getNew();// Class Share files.
		all::$aOut['ol'] = model::online()->getall();// Online Members.
		all::$aOut['lks'] = model::links()->getall();// Alumni Links.
		all::$aOut['cutoff'] = 1;//输出断交按钮

		func::display( all::$aOut, 'index.htm' );
	}
}